<script>
(function($){
	var formSelector = "<?php echo $formSelector; ?>";
	var formData = <?php echo json_encode($formData) ?>;

	if(formData != null){
		$.each(formData, function(id, value){
			$(formSelector+' #'+id).val(value);
		});
	}
})(window.jQuery);
</script>